﻿using System;
using Character;
using UnityEngine;

// Token: 0x02000194 RID: 404
public class AccessoryData : ItemDataBase
{
	// Token: 0x06000AA6 RID: 2726 RVA: 0x0003D9FC File Offset: 0x0003BBFC
	public AccessoryData(int id, string name, string assetbundle, string prefab_M, string prefab_F, string parent, ItemDataBase.SPECIAL special, int order, bool isNew) : base(id, name, assetbundle, order, isNew)
	{
		this.prefab_M = prefab_M;
		this.prefab_F = prefab_F;
		this.defAttach = AccessoryData.CheckAttach(parent);
		this.special = special;
	}

	// Token: 0x06000AA7 RID: 2727 RVA: 0x0003DA30 File Offset: 0x0003BC30
	public static ACCESSORY_ATTACH CheckAttach(string parentKey)
	{
		ACCESSORY_ATTACH accessory_ATTACH = ACCESSORY_ATTACH.NONE;
		if (parentKey.Length > 0)
		{
			for (int i = 0; i < AccessoryData.keys.Length; i++)
			{
				if (parentKey == AccessoryData.keys[i])
				{
					accessory_ATTACH = (ACCESSORY_ATTACH)i;
					break;
				}
			}
			if (accessory_ATTACH == ACCESSORY_ATTACH.NONE)
			{
				GlobalData.Debug_LogError("不明的父键名:" + parentKey);
			}
		}
		return accessory_ATTACH;
	}

	// Token: 0x06000AA8 RID: 2728 RVA: 0x0003DA94 File Offset: 0x0003BC94
	public static bool CheckAttachInHead(ACCESSORY_ATTACH check)
	{
		return check >= ACCESSORY_ATTACH.AP_Head && check <= ACCESSORY_ATTACH.AP_Nose;
	}

	// Token: 0x06000AA9 RID: 2729 RVA: 0x0003DAA8 File Offset: 0x0003BCA8
	public static string GetAttachBoneName(ACCESSORY_ATTACH check)
	{
		if (check == ACCESSORY_ATTACH.NONE)
		{
			return string.Empty;
		}
		return AccessoryData.names[(int)check];
	}

	// Token: 0x04000AAA RID: 2730
	private static string[] keys = new string[]
	{
		"AP_Head",
		"AP_Megane",
		"AP_Earring_L",
		"AP_Earring_R",
		"AP_Mouth",
		"AP_Nose",
		"AP_Neck",
		"AP_Chest",
		"AP_Wrist_L",
		"AP_Wrist_R",
		"AP_Arm_L",
		"AP_Arm_R",
		"AP_Index_L",
		"AP_Index_R",
		"AP_Middle_L",
		"AP_Middle_R",
		"AP_Ring_L",
		"AP_Ring_R",
		"AP_Leg_L",
		"AP_Leg_R",
		"AP_Ankle_L",
		"AP_Ankle_R",
		"AP_Tikubi_L",
		"AP_Tikubi_R",
		"AP_Waist",
		"AP_Shoulder_L",
		"AP_Shoulder_R",
		"AP_Hand_L",
		"AP_Hand_R",
		"0"
	};

	// Token: 0x04000AAB RID: 2731
	private static string[] names = new string[]
	{
		"N_Head",
		"N_Megane",
		"N_Earring_L",
		"N_Earring_R",
		"N_Mouth",
		"N_Nose",
		"N_Neck",
		"N_Chest",
		"N_Wrist_L",
		"N_Wrist_R",
		"N_Arm_L",
		"N_Arm_R",
		"N_Index_L",
		"N_Index_R",
		"N_Middle_L",
		"N_Middle_R",
		"N_Ring_L",
		"N_Ring_R",
		"N_Leg_L",
		"N_Leg_R",
		"N_Ankle_L",
		"N_Ankle_R",
		"N_Tikubi_L",
		"N_Tikubi_R",
		"N_Waist",
		"N_Shoulder_L",
		"N_Shoulder_R",
		"N_Hand_L",
		"N_Hand_R",
		string.Empty
	};

	// Token: 0x04000AAC RID: 2732
	public string prefab_M;

	// Token: 0x04000AAD RID: 2733
	public string prefab_F;

	// Token: 0x04000AAE RID: 2734
	public ACCESSORY_ATTACH defAttach;
}
